/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudm_UEAU
 * UDM UE Authentication Service. � 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 1.2.0-alpha.1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "AuthenticationInfoRequest.h"

namespace oai {
namespace udm {
namespace model {

AuthenticationInfoRequest::AuthenticationInfoRequest() {
  m_SupportedFeatures          = "";
  m_SupportedFeaturesIsSet     = false;
  m_ServingNetworkName         = "";
  m_ResynchronizationInfoIsSet = false;
  m_AusfInstanceId             = "";
  m_CellCagInfoIsSet           = false;
  m_N5gcInd                    = false;
  m_N5gcIndIsSet               = false;
}

AuthenticationInfoRequest::~AuthenticationInfoRequest() {}

void AuthenticationInfoRequest::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json& j, const AuthenticationInfoRequest& o) {
  j = nlohmann::json();
  if (o.supportedFeaturesIsSet())
    j["supportedFeatures"] = o.m_SupportedFeatures;
  j["servingNetworkName"] = o.m_ServingNetworkName;
  if (o.resynchronizationInfoIsSet())
    j["resynchronizationInfo"] = o.m_ResynchronizationInfo;
  j["ausfInstanceId"] = o.m_AusfInstanceId;
  if (o.cellCagInfoIsSet() || !o.m_CellCagInfo.empty())
    j["cellCagInfo"] = o.m_CellCagInfo;
  if (o.n5gcIndIsSet()) j["n5gcInd"] = o.m_N5gcInd;
}

void from_json(const nlohmann::json& j, AuthenticationInfoRequest& o) {
  if (j.find("supportedFeatures") != j.end()) {
    j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
    o.m_SupportedFeaturesIsSet = true;
  }
  j.at("servingNetworkName").get_to(o.m_ServingNetworkName);
  if (j.find("resynchronizationInfo") != j.end()) {
    j.at("resynchronizationInfo").get_to(o.m_ResynchronizationInfo);
    o.m_ResynchronizationInfoIsSet = true;
  }
  j.at("ausfInstanceId").get_to(o.m_AusfInstanceId);
  if (j.find("cellCagInfo") != j.end()) {
    j.at("cellCagInfo").get_to(o.m_CellCagInfo);
    o.m_CellCagInfoIsSet = true;
  }
  if (j.find("n5gcInd") != j.end()) {
    j.at("n5gcInd").get_to(o.m_N5gcInd);
    o.m_N5gcIndIsSet = true;
  }
}

std::string AuthenticationInfoRequest::getSupportedFeatures() const {
  return m_SupportedFeatures;
}
void AuthenticationInfoRequest::setSupportedFeatures(std::string const& value) {
  m_SupportedFeatures      = value;
  m_SupportedFeaturesIsSet = true;
}
bool AuthenticationInfoRequest::supportedFeaturesIsSet() const {
  return m_SupportedFeaturesIsSet;
}
void AuthenticationInfoRequest::unsetSupportedFeatures() {
  m_SupportedFeaturesIsSet = false;
}
std::string AuthenticationInfoRequest::getServingNetworkName() const {
  return m_ServingNetworkName;
}
void AuthenticationInfoRequest::setServingNetworkName(
    std::string const& value) {
  m_ServingNetworkName = value;
}
ResynchronizationInfo AuthenticationInfoRequest::getResynchronizationInfo()
    const {
  return m_ResynchronizationInfo;
}
void AuthenticationInfoRequest::setResynchronizationInfo(
    ResynchronizationInfo const& value) {
  m_ResynchronizationInfo      = value;
  m_ResynchronizationInfoIsSet = true;
}
bool AuthenticationInfoRequest::resynchronizationInfoIsSet() const {
  return m_ResynchronizationInfoIsSet;
}
void AuthenticationInfoRequest::unsetResynchronizationInfo() {
  m_ResynchronizationInfoIsSet = false;
}
std::string AuthenticationInfoRequest::getAusfInstanceId() const {
  return m_AusfInstanceId;
}
void AuthenticationInfoRequest::setAusfInstanceId(std::string const& value) {
  m_AusfInstanceId = value;
}
std::vector<std::string>& AuthenticationInfoRequest::getCellCagInfo() {
  return m_CellCagInfo;
}
void AuthenticationInfoRequest::setCellCagInfo(
    std::vector<std::string> const& value) {
  m_CellCagInfo      = value;
  m_CellCagInfoIsSet = true;
}
bool AuthenticationInfoRequest::cellCagInfoIsSet() const {
  return m_CellCagInfoIsSet;
}
void AuthenticationInfoRequest::unsetCellCagInfo() {
  m_CellCagInfoIsSet = false;
}
bool AuthenticationInfoRequest::isN5gcInd() const {
  return m_N5gcInd;
}
void AuthenticationInfoRequest::setN5gcInd(bool const value) {
  m_N5gcInd      = value;
  m_N5gcIndIsSet = true;
}
bool AuthenticationInfoRequest::n5gcIndIsSet() const {
  return m_N5gcIndIsSet;
}
void AuthenticationInfoRequest::unsetN5gcInd() {
  m_N5gcIndIsSet = false;
}

}  // namespace model
}  // namespace udm
}  // namespace oai
